package fzdy.struct;

import java.util.concurrent.ConcurrentHashMap;

public class MobileCache {
    public static ConcurrentHashMap<String,DevicePostData> map = new ConcurrentHashMap<>();

    public static void addData(DevicePostData mobileData){
        map.put(mobileData.getSn(),mobileData);
    }

    public static boolean isExistMobile(String deviceSn){
        return map.containsKey(deviceSn);
    }

    public static void delData(String deviceSn){
        map.remove(deviceSn);
    }
}
